home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / clue.lha / clue / doc / clue.tex / node180_mn.html < prev    next >
Text File  |  1989-07-12  |  5KB  |  133 lines

  1.  
  2. <H3><A ID="SECTION005111100000000000000"><tex2html_anchor_invisible_mark></A> <A ID="ch:geometry-management"><tex2html_anchor_mark></A><BR>
  3. Geometry Management
  4. </H3><#5205#>
  5.            
  6.       
  7.  
  8. <A ID="2424"><tex2html_anchor_invisible_mark></A>
  9. A composite is expected to act as the <#2425#><B>geometry manager</B><#2425#><A ID="2426"><tex2html_anchor_invisible_mark></A>
  10. for its child contacts; that is, to control
  11. the geometrical properties of its children. As a geometry manager, the role of composite
  12. is to
  13. implement a style of layout for its children. In general, a
  14. composite may operate on a contact's window without any knowledge of the class
  15. or function of the contact. However, some composite contacts will make use of
  16. specific knowledge about their children in order to perform geometry management.
  17.  
  18. <P>
  19. Placing geometry control in the hands of a geometry manager in this way
  20. has several advantages.
  21.  
  22. <UL>
  23. <LI>A geometry manager can arbitrate the competing geometry change requests
  24.         of several contacts in order to implement contraints among them.
  25.  
  26. <P>
  27. </LI>
  28. <LI>A given layout style can be applied to any collection of contacts.
  29.  
  30. <P>
  31. </LI>
  32. <LI>Contact layout style can be changed without the knowledge of individual
  33.         contacts.
  34. </LI>
  35. </UL>
  36.  
  37. <P>
  38. A request to change the geometry of a contact is forwarded to the contact's
  39. parent, which actually performs the resulting change.  It is important to
  40. understand that, due to its constraints, a geometry manager may not be able to
  41. perform a change as requested.  For
  42. example, a request to increase the size of a contact might be refused if its
  43. geometry manager enforces a maximum size.  If a requested change cannot
  44. be done, a geometry manager should suggest a slightly different change
  45. which would be acceptable. Frequently,
  46. a geometry manager will want a child to compute a suitable geometry for
  47. itself; this can be done by calling the <#2429#><TT>preferred-size</TT><#2429#> function.
  48. <A ID="2430"><tex2html_anchor_invisible_mark></A>
  49.  
  50. <P>
  51. A composite's geometry management policy applies only to the set of its children
  52. which are managed.
  53. <A ID="2431"><tex2html_anchor_invisible_mark></A><A ID="2432"><tex2html_anchor_invisible_mark></A>
  54. Any child whose <#2433#><TT>state</TT><#2433#> is <#2434#><TT>:withdrawn</TT><#2434#> is ignored by a geometry manager. Any
  55. geometry change to a <#2435#><TT>:withdrawn</TT><#2435#> child is performed immediately as
  56. requested.  
  57.  
  58. <P>
  59. Geometry management is implemented by the following methods of the
  60. <#2436#><TT>composite</TT><#2436#> class.
  61.  
  62. <P>
  63. <#4695#>
  64. <#4414#><FONT SIZE="+1"><#2437#><B>manage-geometry Method, composite</B><#2437#></FONT><#4414#>
  65. <A ID="2438"><tex2html_anchor_invisible_mark></A>
  66. <A ID="2439"><tex2html_anchor_invisible_mark></A>
  67. <DIV class="RIGHT">
  68. <tex2html_image_mark>#tex2html_wrap_inline10221#
  69. </DIV><#4695#>
  70.  
  71. <P>
  72. <DIV class="RIGHT">
  73. <tex2html_image_mark>#tex2html_wrap_inline10224#</DIV>
  74. <P>
  75. <DIV class="RIGHT"><tex2html_image_mark>#tex2html_wrap_inline10225#</DIV>
  76. <P>
  77. <DIV class="RIGHT"><tex2html_image_mark>#tex2html_wrap_inline10226#
  78. </DIV>
  79.  
  80. <P>
  81. <#4696#>
  82. <#4419#><FONT SIZE="+1"><#2471#><B>manage-priority Method, composite</B><#2471#></FONT><#4419#>
  83. <A ID="2472"><tex2html_anchor_invisible_mark></A>
  84. <A ID="2473"><tex2html_anchor_invisible_mark></A>
  85. <DIV class="RIGHT">
  86. <tex2html_image_mark>#tex2html_wrap_inline10227#
  87. </DIV><#4696#>
  88.  
  89. <P>
  90. <DIV class="RIGHT">
  91. <tex2html_image_mark>#tex2html_wrap_inline10230#
  92. </DIV>
  93.  
  94. <P>
  95. <#4697#>
  96. <#4422#><FONT SIZE="+1"><#2497#><B>change-layout Method, composite</B><#2497#></FONT><#4422#>
  97. <A ID="2498"><tex2html_anchor_invisible_mark></A>
  98. <A ID="2499"><tex2html_anchor_invisible_mark></A>
  99. <DIV class="RIGHT">
  100. <tex2html_image_mark>#tex2html_wrap_inline10231#
  101. </DIV><#4697#>
  102.  
  103. <P>
  104. <DIV class="RIGHT">
  105. <tex2html_image_mark>#tex2html_wrap_inline10234#
  106. </DIV>
  107.  
  108. <P>
  109. The initial geometry of a contact is also determined by the geometry management
  110. policy of it parent composite.  Just before a composite is realized, the <#2519#><TT>initialize-geometry</TT><#2519#> function is called to negotiate the initial geometry of all
  111. descendants of a composite.  This function is called automatically by <#2520#><TT>update-state</TT><#2520#><A ID="2521"><tex2html_anchor_invisible_mark></A>
  112. and rarely needs to be invoked directly by application programmers
  113. or contact programmers.  In some cases, a CLUE program may call <#2522#><TT>initialize-geometry</TT><#2522#> in order to complete initial geometry management without
  114. realizing a composite.
  115.  
  116. <P>
  117. <#4698#>
  118. <#4425#><FONT SIZE="+1"><#2523#><B>initialize-geometry Method, composite</B><#2523#></FONT><#4425#>
  119. <A ID="2524"><tex2html_anchor_invisible_mark></A>
  120. <A ID="2525"><tex2html_anchor_invisible_mark></A>
  121. <DIV class="RIGHT">
  122. <tex2html_image_mark>#tex2html_wrap_inline10235#
  123. </DIV><#4698#>
  124.  
  125. <P>
  126. <DIV class="RIGHT">
  127. <tex2html_image_mark>#tex2html_wrap_inline10238#
  128. </DIV>
  129.  
  130. <P>
  131. <#4428#>
  132.  
  133.  =0 <#5215#>=0 <#5219#>